/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package pinkybhabhiproblem;

/**
 *
 * @author nikhil
 */
public class UserCodeMain {

    public static int output1;

    public static void GetVisibleCount(int input1, int input2, int[][] input3) {

        
        int[] ropelength = new int[input1];
        int i = 0;
        int j = 0;
        
        output1 = 0;
        for (i = 0; i < input2; i++) {
            
            for (j = input3[i][0]; j < ((input3[i][0] + input3[i][1])); j++) {
                ropelength[j] = i;
            }
            
        }

        for (i = 0; i < input2; i++) {
            for (j = 0; j < input1; j++) {
                if (ropelength[j] == i) {
                    output1++;
                    break;
                }
            }
        }

    }
}
